package cn.jeefast.rest.controller;


import cn.jeefast.common.entity.MbTreatmentPlan;
import cn.jeefast.common.utils.R;
import cn.jeefast.rest.service.MbTreatmentPlanService;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author theodo
 * @since 2019-12-30
 */
@RestController
@RequestMapping("/api")
public class MbTreatmentPlanController {

    @Autowired
    private MbTreatmentPlanService treatmentPlanService;

    /**
     * 治疗方案列表
     * @param projId
     * @return
     */
    @RequestMapping("/treatmentPlan/list")
    public R treatmentPlanList(Long projId){
        EntityWrapper ew = new EntityWrapper();
        ew.eq("proj_id",projId);
        List list = treatmentPlanService.selectList(ew);
        return R.ok("").put("data",list);
    }
}
